package com.edee.bigday.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.edee.bigday.order.vo.*;
import com.edee.common.to.SeckillOrderTo;
import com.edee.common.utils.PageUtils;
import com.edee.bigday.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author edee
 * @email 421763094@qq.com
 * @date 2020-12-13 21:58:48
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 订单确认页所需数据
     * @return
     */
    OrderConfirmVo comfirmOrder() throws ExecutionException, InterruptedException;

    /**
     * 下单操作
     * @param vo
     * @return
     */
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderEntityByOrderSn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    /**
     * 获取当前订单的支付信息
     * @param orderSn
     * @return
     */
    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrderTo);
}

